file chooser: Drop the location label
authorMatthias Clasen <mclasen@redhat.com>
Sun, 18 Jan 2015 22:56:07 +0000 (17:56 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 18 Jan 2015 22:57:12 +0000 (17:57 -0500)
Bringing us close to the new design.

gtk/gtkfilechooserwidget.c
gtk/ui/gtkfilechooserwidget.ui
gtk/ui/gtkfilechooserwidget.ui.h

index f3cdd4c76d9cd968bfdf59b8e87d2b5ea8c1635c..40c72806b10b418fa1f429c6d140a906313ca01c 100644 (file)
@@ -250,7 +250,6 @@ struct _GtkFileChooserWidgetPrivate {
   GtkWidget *extra_widget;
 
   GtkWidget *location_entry_box;
-  GtkWidget *location_label;
   GtkWidget *location_entry;
   LocationMode location_mode;
 
@@ -1971,6 +1970,9 @@ location_entry_create (GtkFileChooserWidget *impl)
   if (!priv->location_entry)
     {
       priv->location_entry = _gtk_file_chooser_entry_new (TRUE);
+      if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
+          priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
+        gtk_entry_set_placeholder_text (GTK_ENTRY (priv->location_entry), _("Location"));
       g_signal_connect (priv->location_entry, "changed",
                         G_CALLBACK (location_entry_changed_cb), impl);
     }
@@ -2086,7 +2088,6 @@ location_switch_to_filename_entry (GtkFileChooserWidget *impl)
     {
       location_entry_create (impl);
       gtk_box_pack_start (GTK_BOX (priv->location_entry_box), priv->location_entry, TRUE, TRUE, 0);
-      gtk_label_set_mnemonic_widget (GTK_LABEL (priv->location_label), priv->location_entry);
     }
 
   /* Configure the entry */
@@ -7425,7 +7426,6 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, extra_align);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, extra_and_filters);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, location_entry_box);
-  gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, location_label);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, search_bar);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, search_entry);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_name_column);
index b5d60b1e50c74a3a6ddb1923760a85a333f4d928..61b7635a2bba13892c3f7a5cf392d5ea9dacdc68 100644 (file)
                             <property name="no-show-all">True</property>
                             <property name="spacing">12</property>
                             <property name="border_width">6</property>
-                            <child>
-                              <object class="GtkLabel" id="location_label">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">_Location:</property>
-                                <property name="use_underline">True</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
                             <child>
                               <placeholder/>
                             </child>
index 2c65d51d85f29ebafd2748f0dedaac5b664b8729..9c8a16ad2fa31e881556852d2819a31598b7b9d4 100644 (file)
@@ -1,5 +1,4 @@
 N_("Create Fo_lder");
-N_("_Location:");
 N_("Files");
 N_("Name");
 N_("Size");